<%-- 
    Document   : generarGuia
    Created on : 31/10/2009, 10:25:39 AM
    Author     : ADMINISTRADOR
--%>

<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="t" uri="http://myfaces.apache.org/tomahawk"%>
<%@taglib prefix="r" uri="http://richfaces.ajax4jsf.org/rich" %>
<%@taglib uri="http://richfaces.org/a4j" prefix="a4j"%>

<script language="javascript" src="../js/funciones.js"></script>
<link href="/colegiatura/Estilos/estilosEsymons.css" rel="stylesheet" type="text/css" />

<f:view>
<h:form>
<table width="900" border="0">
    <tr><td height="25"  align="left" class="texto3">
      <h:outputLabel value=" Guía de Remisión "/></td>
  </tr>
  <tr><td height="20">
     <a4j:outputPanel ajaxRendered="true">
    <h:messages id="lblMessages" styleClass="messages" infoClass="infoClass" errorClass="errorClass"
                warnClass="warnClass" showDetail="true" errorStyle="color:red;"
                warnStyle="color:green;" infoStyle="color:black;" fatalStyle="color:black"/>
    </a4j:outputPanel>
      </td>
  </tr>
  <tr><td>
  <fieldset><legend>Guía de Remisión</legend>
  <table width="900" border="0">
  <tr><td width="233" height="61" align="center" valign="middle">
      <h:graphicImage alt="Image" url="/imagenColegiatura/guia.png"/></td>
  <td width="177" height="61"></td>
  <td width="211" height="61"></td>
  <td width="261" height="61"></td>
  </tr>
  <tr>
  <td align="left" colspan="3" height="20" valign="middle">
     <h:commandButton rendered="#{reportesController.activar==false}" action="#{reportesController.agregarOtro}" value="Agregar Nuevo" styleClass="enlace9" />
     <h:commandButton rendered="#{reportesController.activar==true}" action="#{reportesController.nuevaGuia}" value="Nueva Guia" styleClass="enlace9" />
     <h:commandButton action="#{reportesController.guardarGuia}" value="Guardar Guía" styleClass="enlace9" />
     <h:commandButton action="#{jasperController.exportarGuiaRemision}" value="Generar PDF" styleClass="enlace9" />
</td>
<td align="center"></td>
</tr>
  </table>
  </fieldset>
  </td></tr>  
</table>
<r:dataTable rendered="#{reportesController.listaDetalleGuia!=null}"
value="#{reportesController.listaDetalleGuia}" var="guia" rows="10" reRender="dt"
id="preins" border="0" headerClass="texto18" >
   <r:column width="100" >
     <f:facet name="header"><h:outputLabel value="DNI / Carnet Ext." /></f:facet>
         <h:outputLabel rendered="#{guia.colCodigo.perNroDNI!=null}" value="#{guia.colCodigo.perNroDNI}" styleClass="texto20" />
         <h:outputLabel rendered="#{guia.colCodigo.perNroPasaporte!=null}" value="#{guia.colCodigo.perNroPasaporte}" styleClass="texto20" />
  </r:column>
     <r:column width="300" >
         <f:facet name="header"><h:outputLabel value="Nombre" /></f:facet>
        <h:outputLabel value="#{guia.colCodigo.nombreColegiado}" styleClass="texto20" />
    </r:column>
    <r:column width="100" >
         <f:facet name="header"><h:outputLabel value="Nro Ficha" /></f:facet>
         <h:outputLabel rendered="#{reportesController.activar==true}"value="#{guia.dgrnroCarnet}" styleClass="texto20" />
         <h:inputText rendered="#{reportesController.activar==false}" value="#{guia.dgrnroCarnet}" styleClass="fondo012" />
  </r:column>
    <r:column width="50">
        <f:facet name="header"></f:facet>
        <h:commandButton rendered="#{reportesController.activar==false}" action="#{reportesController.quitarPreinscrito}" image="/imagenColegiatura/eliminar.png" title="Quitar" >
            <f:setPropertyActionListener target="#{reportesController.detalleGuia}" value="#{guia}"/>
        </h:commandButton>
    </r:column>
    <f:facet name="footer">
      <r:datascroller id="dt" renderIfSinglePage="false"></r:datascroller>
    </f:facet>
</r:dataTable>
</h:form>
</f:view>

